/* Put the domain in shadow mode even though we're going to be using
* the shared 1:1 page table initially. It shouldn't hurt */
shadow_mode_enable(ed->domain,
- SHM_enable|SHM_refcounts|SHM_translate|SHM_external);
+ SHM_enable|SHM_write_all|SHM_refcounts|
+ SHM_translate|SHM_external);
}
return 0;
// guest page.
// This only applies when we have writable page tables.
//
- if ( (stype == PGT_l1_shadow) && !VM_ASSIST(d, VMASST_TYPE_writable_pagetables) )
- continue;
- if ( (stype != PGT_l1_shadow) && !shadow_mode_write_all(d) )
+ if ( !shadow_mode_write_all(d) &&
+ !((stype == PGT_l1_shadow) &&
+ VM_ASSIST(d, VMASST_TYPE_writable_pagetables)) )
+ // Page is not writable -- no resync necessary
continue;
}
l1_pgentry_t *shadow1 = shadow;
l1_pgentry_t *snapshot1 = snapshot;
- ASSERT(VM_ASSIST(d, VMASST_TYPE_writable_pagetables));
+ ASSERT(VM_ASSIST(d, VMASST_TYPE_writable_pagetables) ||
+ shadow_mode_write_all(d));
if ( !shadow_mode_refcounts(d) )
revalidate_l1(d, guest1, snapshot1);